package com.tces.demo.service.impl;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.tces.demo.domain.UploadVideo;
import com.tces.demo.mapper.UploadVideoMapper;
import com.tces.demo.service.UploadVideoService;

@Service
public class UploadVideoServiceImpl implements UploadVideoService{

	@Autowired
	private UploadVideoMapper uploadVideoMapper;
	
	@Override
	public int add(UploadVideo video) {
		// TODO Auto-generated method stub
		return uploadVideoMapper.insert(video);
	}

	@Override
	public List<UploadVideo> getList() {
		// TODO Auto-generated method stub
		return uploadVideoMapper.selectList();
	}

	@Override
	public UploadVideo getOneById(int id) {
		// TODO Auto-generated method stub
		return uploadVideoMapper.selectOneById(id);
	}

	@Override
	public int updateCurrentTimeById(int currentTime, int id) {
		// TODO Auto-generated method stub
		return uploadVideoMapper.updateCurrentTimeById(currentTime, id);
	}

}
